package com.t.bricks.bussiness.controller.test;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.t.bricks.bussiness.db.dao.sequence.SequenceDao;
import com.t.bricks.model.MsgEmity;

@RestController
@Api(value="记录编号序列管理表", tags={"基本系统-记录编号序列管理表操作接口"})
//@RequestMapping("/table/key/")
public class SequenceController {

	/**
	 * 记录编号序列管理表业务实现类
	 */
	@Autowired
	private SequenceDao sequenceDao;

	/**
	 * 删除数据
	 * @param iVersion
	 * @param iId 表编号
	 * @return
	 */
	@ApiOperation(value="测试")
	@ApiImplicitParams({
		@ApiImplicitParam(name="ii", value="数字", dataType="Integer", paramType="query", required=true)
	})
	
	@RequestMapping(method={RequestMethod.GET}, value="/time")
	public MsgEmity test(Integer ii) {
		String dbName = "Dev_BricksOA.";
		MsgEmity me = sequenceDao.createTable(dbName);
		
		System.out.println(me.getMsg());
		
		String k = sequenceDao.getNewId(dbName, 8, "SystemLog");
		
		return MsgEmity.success(k);
	}
	
}
